define(["app", "angular", "services/BaseService"], function(app, angular) {
	
	var deps = ["$http", "BaseService"];
	
	function yokiViceResource($http, BaseService) {
        return initResource($http, BaseService.restfulUrl + "voice/", BaseService.formHeader);
    }
	
	var postHeader = {
	        "Content-Type" : "application/x-www-form-urlencoded;charset=utf-8"
	};
	
	function initResource($http, preUrl,formHeader) {
        return {
        	deleteVoiceAndReport:function(userVoiceId){
                return $http.get(preUrl +userVoiceId+ "/deleteVoiceAndReport");
            },
            cancelReport:function(userVoiceId){
                return $http.get(preUrl +userVoiceId+ "/cancelReport");
            },
            
            deleteLocalVoice:function(userVoiceId){
                return $http.get(preUrl +userVoiceId+ "/deleteLocalVoice");
            },
            
            
            queryLocalVoiceList: function (pageNo,pageSize,keyWord,countryName) {
                return $http.get(preUrl + "queryLocalVoiceList", {
                    params: {
                        pageSize: pageSize || 10000,
                        pageNo: pageNo || 1,
                        keyWord :keyWord,
                        countryName :countryName
                    }
                });
            },
            queryReportVoiceList: function (pageNo,pageSize,keyWord,countryName) {
                return $http.get(preUrl + "queryReportVoiceList", {
                    params: {
                        pageSize: pageSize || 10000,
                        pageNo: pageNo || 1,
                        keyWord :keyWord,
                        countryName :countryName
                    }
                });
            },
            
            updateStatus: function (userVoiceId,type) {
                return $http.get(preUrl + "updateStatus", {
                    params: {
                    	userVoiceId: userVoiceId,
                    	type: type
                    }
                });
            },
        };
        
    }
	yokiViceResource.$inject = deps;
	app.lazy.factory("AddYokiViceResource", yokiViceResource);
});
